package com.tiny.work.test.access;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class MyClazz {

    static int a = 10;

    static {
        a = a + 1;
    }


    public static void main(String[] args) throws IllegalAccessException, InstantiationException {

        NovelNews novelNews = NovelNews.class.newInstance();

        List<NovelNews> novelNewsList = new ArrayList<>();
//        novelNewsList.add(new NovelNews(23L));
//        novelNewsList.add(new NovelNews(123L));
//        novelNewsList.add(new NovelNews(223L));
//        novelNewsList.add(new NovelNews(2231L));
//        Collections.sort(novelNewsList, new Comparator() {
//            public int compare(Object obj0, Object obj1) {
//                NovelNews novel0 = (NovelNews) obj0;
//                NovelNews novel1 = (NovelNews) obj1;
//                return ((Long) novel0.getHeat()).compareTo(novel1.getHeat());
//            }
//        });
//
//        for (int i = 0; i <= novelNewsList.size() - 1; i++) {
//            System.out.println(novelNewsList.get(i).getHeat());
//        }
    }


    public static class NovelNews {

        long heat;

        BigDecimal data  = BigDecimal.valueOf(0.000111101111);
//        BigDecimal data  = 0;

        public void setHeat(long heat) {
            this.heat = heat;
        }

        public long getHeat() {
            return heat;
        }

        public void setHeat(Long heat) {
            this.heat = heat;
        }
    }
}
